<?
	require_once('../inc/facebook.php');
	$facebook = new Facebook(array(
		'appId' => '459317670792276',
		'secret' => '3e4736c48fcac0d0ca2cadf0fdd791fd'
	));
	
	$fbUser = $facebook->getUser();
	$friends = $facebook->api("/me/friends");
	
	//echo $facebook->getAccessToken();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Home Page</title>
    <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css">
    <link rel="stylesheet" type="text/css" href="../inc/bootstrap.css">
</head>

<body>
        <? include('../inc/header.php'); ?>
        <div class="container">
			<? include('../inc/nav.php'); ?>
            <ul class="unstyled">
            	<? foreach($friends['data'] as $f): ?>
                <li>
                	<a href="http://facebook.com/<?=$f['id']?>">
                    	<img src="http://graph.facebook.com/<?=$f['id']?>/picture" />
                        <?=$f['name']?>
                    </a>
                </li>
                <? endforeach; ?>
            </ul>
		</div>
</body>
</html>


